package com.tvein.sanguo.action.controller.system
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.action.common.GameConstants;
//
	public class SystemCommand extends SimpleFabricationCommand implements ICommand
	{
		override public function execute(notification:INotification) : void
		{
			switch(notification.getBody()[0])
			{
				case "-showBox":
					sendNotification(GameConstants.ACTION_SYSTEM, notification.getBody()[1]);
					break;
				case "-userConfirm":
					if (notification.getBody()[1] == "close")
					{
						sendNotification(GameConstants.ACTION_CLOSE, "*");
					}
					else
					{
						routeNotification(GameConstants.GAME_CONSOLE, [notification.getBody()[1]], null, "*");
					}
					break;
			}
		}
	}
}